#ifndef __UI_HEAD_H__
#define __UI_HEAD_H__

#include <QWidget>
#include <QTimer>

#include "../UIBase/QCWidget.h"

class UIHead : public QCWidget
{
	Q_OBJECT
public:

	enum HeadEntry {
		Entry_List,
		Entry_Frame,
	};

public:
	explicit UIHead(HeadEntry entry, QWidget* parent = 0);
	~UIHead();

public:
	void setQCGeometry(int x, int y, int w, int h);
	void initContent();
	void setBackVisible(bool bVisible);

protected:
	void showEvent(QShowEvent* e);
	void hideEvent(QHideEvent* e);

public slots:
	void onClock();
	void onClose();
	void onSetting();
	void onBack();

private:
	QLabel* m_pLabelName;
	QLabel* m_pLabelDepartment;
	QWidget* m_pShadow;

	QLabel* m_pIconClock;
	QLabel* m_pLabelClock;
	QPushButton* m_pBtnSetting;
	QPushButton* m_pBtnClose;
	QPushButton* m_pBtnBack;

private:
	QTimer* m_timer;

	HeadEntry m_eEntry;
};
#endif //!__UI_HEAD_H__
